home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1994 #2
/
Monster Media No. 2 (Monster Media)(1994).ISO
/
soundu
/
dilaudid.zip
/
SCORE
/
SCORE.BAS
next >
Wrap
BASIC Source File
|
1993-12-30
|
6KB
|
156 lines
DECLARE SUB drawscreen ()
DECLARE SUB drawloc (scoreloc%)
DECLARE SUB drawcurrent ()
DEFINT A-Z
COMMON SHARED startat, score$, currloc, currnote
length = 500
DIM SHARED score$(1 TO length, 1 TO 21)
CLS
WIDTH , 43
startat = 1
currloc = 1
currnote = 0
drawscreen
DO
drawcurrent
x$ = ""
DO UNTIL x$ <> ""
x$ = INKEY$
LOOP
drawloc currloc
SELECT CASE x$
CASE CHR$(0) + CHR$(72)' ^^^
currnote = currnote - 1
CASE CHR$(0) + CHR$(80)' vvv
currnote = currnote + 1
CASE CHR$(0) + CHR$(77)' -->
currloc = currloc + 1
IF currloc > startat + 75 THEN
startat = startat + 40
drawscreen
END IF
CASE CHR$(0) + CHR$(75)' <--
IF currloc > 1 THEN
currloc = currloc - 1
IF currloc < startat THEN
startat = startat - 40
drawscreen
END IF
END IF
CASE "-" 'make flat
IF NOT (INSTR(a$ + " ", "#")) THEN a$ = a$ + "#"
CASE "." 'make longer
IF NOT (INSTR(a$ + " ", ".")) THEN a$ = a$ + "."
CASE "1" 'whole note
score$(currloc, currnote + 11) = "1" + a$
FOR r = 1 TO 15
score$(currloc + r, currnote + 11) = "-"
drawloc currloc + r
NEXT
a$ = ""
CASE "2" 'half note
score$(currloc, currnote + 11) = "2" + a$
FOR r = 1 TO 7
score$(currloc + r, currnote + 11) = "-"
drawloc currloc + r
NEXT
IF (INSTR(a$ + " ", ".")) THEN
FOR r = 8 TO 11
score$(currloc + r, currnote + 11) = "-"
drawloc currloc + r
NEXT
END IF
a$ = ""
CASE "4" 'quarter note
score$(currloc, currnote + 11) = "4" + a$
FOR r = 1 TO 3
score$(currloc + r, currnote + 11) = "-"
drawloc currloc + r
NEXT
IF (INSTR(a$ + " ", ".")) THEN
score$(currloc + 4, currnote + 11) = "-"
drawloc currloc + 4
score$(currloc + 5, currnote + 11) = "-"
drawloc currloc + 5
END IF
a$ = ""
CASE "8" 'eighth note
score$(currloc, currnote + 11) = "8" + a$
score$(currloc + 1, currnote + 11) = "-"
drawloc currloc + 1
IF (INSTR(a$ + " ", ".")) THEN
score$(currloc + 2, currnote + 11) = "-"
drawloc currloc + 2
END IF
a$ = ""
CASE "6" 'sixteenth note
score$(currloc, currnote + 11) = "6" + a$
a$ = ""
CASE "3" 'thirtysecond note
score$(currloc, currnote + 11) = "3" + a$
a$ = ""
CASE " " 'delete note
score$(currloc, currnote + 11) = ""
a$ = ""
CASE "s"
OPEN "output.dat" FOR OUTPUT AS #1
FOR r = 1 TO length
FOR t = 1 TO 21
x$ = score$(r, t)
IF x$ = "" OR x$ = "-" THEN x$ = " "
PRINT #1, x$;
NEXT
NEXT
CLOSE
CASE "q"
END
END SELECT
LOOP
SUB drawcurrent
h = (currloc - startat) + 1
v = currnote + 15
LOCATE v, h: COLOR 15: PRINT CHR$(219); : COLOR 7
END SUB
SUB drawloc (scoreloc)
r = (scoreloc - startat) + 1
h = (scoreloc - startat) + 1
FOR t = 5 TO 10
LOCATE t, h
PRINT " ";
NEXT
FOR t = 20 TO 25
LOCATE t, h
PRINT " ";
NEXT
FOR t = 2 TO 8 STEP 2
LOCATE 10 + t, h
PRINT " ";
NEXT
FOR t = 1 TO 10 STEP 2
LOCATE 10 + t, h
PRINT CHR$(196);
NEXT
FOR t = 5 TO 24
IF score$(scoreloc, t - 4) <> "" THEN
LOCATE t, h
PRINT score$(scoreloc, t - 4);
END IF
NEXT
END SUB
SUB drawscreen
FOR r = startat TO startat + 79
drawloc r
NEXT
END SUB